package com.ruoyi.event.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.annotation.UserDrugInfo;
import com.ruoyi.common.convert.ExcelDictConvert;
import lombok.Data;

import java.util.Date;


/**
 * 药物维持治疗视图对象 event_ywwczl
 *
 * @author strongme
 * @date 2023-02-04
 */
@Data
@ExcelIgnoreUnannotated
public class EventYwwczlVo implements EventInfo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long ywwczlId;

    /**
     * 吸毒人员id
     */
    @ExcelProperty(value = "吸毒人员id")
    private Long userId;

    @UserDrugInfo
    public Object getUserInfo() {
        return userId;
    }

    /**
     * 药物
     */
    @ExcelProperty(value = "药物")
    private String yw;

    /**
     * 主治医生
     */
    @ExcelProperty(value = "主治医生")
    private String zzys;

    /**
     * 初次服药时间
     */
    @ExcelProperty(value = "初次服药时间")
    private Date ccfysj;

    /**
     * 治疗日期
     */
    @ExcelProperty(value = "治疗日期")
    private Date zlrq;

    /**
     * 服药次数（次/月）
     */
    @ExcelProperty(value = "服药次数", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "次=/月")
    private Long fycs;

    /**
     * 服药量（总计）
     */
    @ExcelProperty(value = "服药量", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "总=计")
    private String fyl;

    /**
     * 治疗地区
     */
    @ExcelProperty(value = "治疗地区")
    private String zldq;

    /**
     * 治疗单位
     */
    @ExcelProperty(value = "治疗单位")
    private String zldw;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;


    @Override
    public Long getId() {
        return ywwczlId;
    }

    @Override
    public String getText() {
        return yw;
    }

    @Override
    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date getTime() {
        return zlrq;
    }
}
